package com.zyg.exception;

import com.zyg.common.ResultCode;
import lombok.Getter;

/**
 * 自定义错误类型基础类
 */
@Getter
public class ZygBaseException extends RuntimeException{

    private Integer code;

    public ZygBaseException(String msg,Integer code){
        super(msg);
        this.code = code;
    }

    public ZygBaseException(ResultCode resultCode){
        this(resultCode.getMsg(),resultCode.getCode());
    }

}
